<?php

include('/var/www/html/new/d/module/api/bd_zhidahao/baidu_zdh.class.php');
$BD_zdh = new BD_zdh();

if (!class_exists("go_sql")){
	include("/var/www/html/new/conf/le.je");
	$le=new go_sql();
	$le->connect();
}

$txt=file_get_contents('php://input');
$BD_zdh->logfile($txt,'bdzdh_return_log');

// $txt = '{"VerifyCode":"92f6a541a27b37fc5adb3d1af1be0a9e","Order16U":"2853696","ActionTime":"2015-11-19 14:12:57","OrderCall":"200002183","Tnumber":"5","OrderState":1}';

$data = json_decode($txt);

$time=  strtotime($data->ActionTime); //获取时间戳
$orderId = $data->OrderCall; 	//百度直达号主订单号
$Order16U =  $data->Order16U; //票付通订单号
$Tnumber =  $data->Tnumber; //验证数量

$selorder = "update all_api_order set oStatus = 1  where pftOrder='$Order16U' limit 1";
$GLOBALS['le']->query($selorder);

$selorder = "select tempOrder from all_api_order where pftOrder='$Order16U' limit 1";
$GLOBALS['le']->query($selorder);
$GLOBALS['le']->fetch_assoc();
$subOrder = $GLOBALS['le']->f('tempOrder');
// echo "http://www.12301.cc/module/api/bd_zhidahao/bdzdh_orderNote.php?cmd=check&orderId=$orderId&subOrder=$subOrder&Order16U=$Order16U&Tnumber=$Tnumber&time=$time";exit; 
file_get_contents("http://www.12301.cc/module/api/bd_zhidahao/bdzdh_orderNote.php?cmd=check&orderId=$orderId&subOrder=$subOrder&Order16U=$Order16U&Tnumber=$Tnumber&time=$time"); //验证通知 
?>